<template>
	<div>
		<business-user :business="business" :tab-name="tabName" />
	</div>
</template>

<script>
	import { mapGetters } from 'vuex'
	import BusinessUser from '../components/BusinessUser.vue'
	import { getBusinessInfo } from '@/api/business'
	export default{
		components: {
		  BusinessUser
		},
		data() {
			return {
				// 配置
				tabName: 'user',
				// 数据
				business: {
				  id: ''
				},
			}
		},
		computed: {
		  ...mapGetters(['fileBaseUrl', 'businessInfo'])
		},
		mounted() {
			this.fetchData()
		},
		methods:{
			// 获取商户信息
			fetchData() {
			  getBusinessInfo().then((res) => {
			    this.business = res.data
			    this.vipInfoCard_1 = [
			      { name: '门店数量', value: this.business.shopNum },
			      { name: '行业', value: this.business.firstClass },
			      { name: '地址', value: this.business.address }
			    ]
			    this.vipInfoCard_2 = [
			      { name: '负责人', value: this.business.principal },
			      { name: '手机号码', value: this.business.mobilePhone },
			      { name: '联系邮箱', value: this.business.email }
			    ]
			  })
			},
		}
		
	}
</script>

<style>
</style>